🎖️GitЯра🎖️
core/api/README.md copilot/create-implementation-plan (228d872f) Text, 3.26 KB
T383838:core:api (Meshtastic Android API)
│ Deprecation notice The AIDL-based service integration (T383838IMeshService) is deprecated and will be
│ removed in a future release. The recommended integration path for ATAK and other external apps is
│ the built-in Local TAK Server introduced in T383838core:takserver. Connect ATAK to T383838127.0.0.1:8087 (TCP)
│ and import the DataPackage exported from the TAK Config screen to complete setup. No AIDL binding
│ or JitPack dependency is required.
Overview
The T383838:core:api module contains the AIDL interface and dependencies for third-party applications
that currently integrate with the Meshtastic Android app via service binding. New integrations
should use the Local TAK Server instead (see deprecation notice above).
Integration
To communicate with the Meshtastic Android service from your own application, we recommend using JitPack.
Dependencies
Add the following to your T383838build.gradle.kts:
T282828
Te6edf3dependencies Tb4b4b4{
T8b949e// The core AIDL interface and Intent constants
Te6edf3implementationTb4b4b4(Ta5d6ff"Ta5d6ffcom.github.meshtastic.Meshtastic-Android:meshtastic-android-api:v2.x.xTa5d6ff"Tb4b4b4)
T8b949e// Data models (DataPacket, MeshUser, NodeInfo, etc.) - Kotlin Multiplatform
Te6edf3implementationTb4b4b4(Ta5d6ff"Ta5d6ffcom.github.meshtastic.Meshtastic-Android:meshtastic-android-model:v2.x.xTa5d6ff"Tb4b4b4)
T8b949e// Protobuf definitions (PortNum, Telemetry, etc.) - Kotlin Multiplatform
Te6edf3implementationTb4b4b4(Ta5d6ff"Ta5d6ffcom.github.meshtastic.Meshtastic-Android:meshtastic-android-proto:v2.x.xTa5d6ff"Tb4b4b4)
Tb4b4b4}
(Replace T383838v2.x.x with the latest stable version).
Usage
1. Bind to the Service
Use the T383838IMeshService interface to bind to the Meshtastic service.
T282828
Tff7b72val Te6edf3intent Tff7b72= Te6edf3IntentTb4b4b4(Ta5d6ff"Ta5d6ffcom.geeksville.mesh.ServiceTa5d6ff"Tb4b4b4)
T8b949e// ... query package manager and bind
2. Interact with the API
Once bound, cast the T383838IBinder to T383838IMeshService.
3. Register a BroadcastReceiver
Use T383838MeshtasticIntent constants for actions. Remember to use T383838RECEIVER_EXPORTED on Android 13+.
Key Components
• T383838IMeshService.aidl: The primary AIDL interface.
• T383838MeshtasticIntent.kt: Defines Intent actions for received messages and status changes.
Module dependency graph
<!--region graph-->
T282828
Te6edf3graph Te6edf3TB
:Te6edf3coreTb4b4b4:Te6edf3apiTff7b72[Te6edf3apiTff7b72]Tff7b72:::Te6edf3androidTff7b72-Te6edf3library
:Te6edf3coreTb4b4b4:Te6edf3api T8b949e--> :core:model
Te6edf3classDef Te6edf3androidTff7b72-Te6edf3application Te6edf3fillTb4b4b4:Te6edf3#CAFFBFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3androidTff7b72-Te6edf3applicationTff7b72-Te6edf3compose Te6edf3fillTb4b4b4:Te6edf3#CAFFBFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3composeTff7b72-Te6edf3desktopTff7b72-Te6edf3application Te6edf3fillTb4b4b4:Te6edf3#CAFFBFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3androidTff7b72-Te6edf3feature Te6edf3fillTb4b4b4:Te6edf3#FFD6A5Tb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3androidTff7b72-Te6edf3library Te6edf3fillTb4b4b4:Te6edf3#9BF6FFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3androidTff7b72-Te6edf3libraryTff7b72-Te6edf3compose Te6edf3fillTb4b4b4:Te6edf3#9BF6FFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3androidTff7b72-Te6edf3test Te6edf3fillTb4b4b4:Te6edf3#A0C4FFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3jvmTff7b72-Te6edf3library Te6edf3fillTb4b4b4:Te6edf3#BDB2FFTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3kmpTff7b72-Te6edf3feature Te6edf3fillTb4b4b4:Te6edf3#FFD6A5Tb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3kmpTff7b72-Te6edf3libraryTff7b72-Te6edf3compose Te6edf3fillTb4b4b4:Te6edf3#FFC1CCTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Te6edf3kmpTff7b72-Te6edf3library Te6edf3fillTb4b4b4:Te6edf3#FFC1CCTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
Te6edf3classDef Tff7b72unknown Te6edf3fillTb4b4b4:Te6edf3#FFADADTb4b4b4,Te6edf3strokeTb4b4b4:Te6edf3#000Tb4b4b4,Te6edf3strokeTff7b72-Te6edf3widthTb4b4b4:T79c0ff2Te6edf3pxTb4b4b4,Te6edf3colorTb4b4b4:Te6edf3#000Tb4b4b4;
<!--endregion-->
Served by rngit 1.4.2 - Generated in 0.13s